import { defineStore } from 'pinia'

let mpAuthHost = 'daojia.jiediqi.cn'
if (process.env.NODE_ENV === 'development') {
    mpAuthHost = '2349yn5239.51mypc.cn'
}
let baseUrlList: string[], trackUrl: string, logSwtich: boolean
if (process.env.NODE_ENV === 'development') {
    baseUrlList = ['https://23495lq239.oicp.vip', 'http://192.168.124.28:38808']
    trackUrl = 'https://meiye.cn-shenzhen.log.aliyuncs.com/logstores/foreground-dev/track'
    logSwtich = false
} else {
    baseUrlList = ['https://api.meiye.jiediqi.cn']
    trackUrl = 'https://meiye.cn-shenzhen.log.aliyuncs.com/logstores/foreground-prod/track'
    logSwtich = false
}
let appId = ''
if (process.env.NODE_ENV === 'development') {
    appId = 'wx05f9061fde08a74f'
}
let providerList :{cityName:string,id:string}[] = []
export const appStore = defineStore('app', {
    state: () => (
        {
            appName: 'MeiYe-DaoJia',
            projectName: 'MeiYe-DaoJia',
            platName: '康有利到家',
            platPhone: '400-007-5113',
            mpAppId: 'wx76782a0d45b144ee',
            mpSnsapiUserinfo: 1,
            mpAuthHost: mpAuthHost,
            appVersion: '2.3.0', //app版本号
            copyrightInfo: '福建接地气健康科技有限公司版权所有', //app版本号

            sucImage: 'https://static.meiye.jiediqi.cn/f360/764595/c7a4acf868348d0f997decea116a025f.png',
            logoImage: 'https://static.meiye.jiediqi.cn/f360/764595/3414087a14bd9646947c09bcfcf3ebb3.png',
            errorImage: 'https://static.meiye.jiediqi.cn/f360/764595/3512903448a35c67bc83168bcd11364d.png',
            loadImage: 'https://static.meiye.jiediqi.cn/f360/764595/3c2de305a58b5eab59d87524eff4b6b5.png',
            noDataImage: 'https://static.meiye.jiediqi.cn/f360/764595/827609cee1ae69dea32fd245cadb02a8.png',

            //在线客服
            onlineKefu: 'https://work.weixin.qq.com/kfid/kfcc0752fc2dddbfc2f',
            amapMapKey: 'b1851259a032fe89e4e1916d903a1a74',
            tengxunMapKey: 'TFFBZ-5QKEX-HBL43-73BF2-NRLBH-ISBJA',

            baseUrlList: baseUrlList,
            trackUrl: trackUrl,
            logSwtich: false,
            staticUrl: 'https://static.meiye.jiediqi.cn/',
            aesKey: 'xFVWOQP2BO4CNpyWyNbQEexHV98v7yUx',
            //七牛云上传地址
            qiniuUploadUrl: 'https://upload-cn-east-2.qiniup.com',
            appId:appId,
            
            svcProviderId:'',
            providerList:providerList,
            location: {
                longitude:'',
                latitude:'',
            }
        }
    )
})

